Ignore pods with status.phase=Succeeded when watching IP addresses#5412
Ignore pods with status.phase=Succeeded when watching IP addresses#5412kleimkuhler merged 1 commit intolinkerd:mainfrom
Conversation
When a pod terminates successfully, some CNIs will assign its IP address to newly created pods. This can lead to duplicate pod IPs in the same Kubernetes cluster. Filter out pods which are in a Succeeded phase since they are not routable anymore. Fixes linkerd#5394 Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
|
|
||
| // Ignore terminated pods, | ||
| // their IPs can be reused for new Running pods | ||
| if podTerminated(pod) { |
There was a problem hiding this comment.
Not 100% sure if this change is need. Looking forward to any feedback
There was a problem hiding this comment.
I think we want to omit terminated pods any time we are using the pod ip index. So yes, I think this makes sense.
|
This looks great to me. @kforsthoevel are you able to test this branch and confirm if it fixes #5394 for you? |
|
Thanks. We will try it out after the holidays. |
|
@adleong - Is there any chance that you improve your build process by pushing the branch images? - Or are they already pushed and I do not see them. - The ones used during building seem to be tagged correctly but not pushed. That would help us a lot to test it. Else we would build / push those images ourselves. Greetings :) |
|
@thomaspeitz It's not exactly what you're asking for, but we do have something like this available if you clone the repo. There is a script For this PR, I can test in a k3d cluster with the following: Then you can install it and test: The value of |
|
The way I tested the change was by first running the |
|
Thanks for your input! We will continue tomorrow and give you feedback as soon as possible. |
|
We upgraded to newest edge version, replaced the destination container with the updated controller image and now monitor closely logs in case any problem happen. We get back to you beginning next week with test results (or earlier in cases of problems). Thanks for your work! :) |
|
@adleong, @fpetkovski The patch is running for almost a week now and we haven't see the error anymore. It seems to have fixed the issue. Thank you for the quick fix. |
kleimkuhler
left a comment
There was a problem hiding this comment.
Looks great, thanks @fpetkovski
adleong
left a comment
There was a problem hiding this comment.
Awesome! Thanks @kforsthoevel for confirming!
|
What version includes the fix? |
|
This only recently merged so it is not part of a release yet. We do edge releases at the end of each week, so |
|
Another question: can the fix be included as a hotfix into last couple of stable versions without having everyone to upgrade to a release with all of the new functionality? It is a quite critical bug that causes issues when pods cannot even start because liveness probes cannot pass. And this probably causes hidden issues when traffic cannot be balanced properly (I guess this is what is happening when we see the WARNs in logs). |
|
@kivagant-ba Sure, we'll release a |
…5412) Ignore pods with status.phase=Succeeded when watching IP addresses When a pod terminates successfully, some CNIs will assign its IP address to newly created pods. This can lead to duplicate pod IPs in the same Kubernetes cluster. Filter out pods which are in a Succeeded phase since they are not routable anymore. Fixes #5394 Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
…5412) Ignore pods with status.phase=Succeeded when watching IP addresses When a pod terminates successfully, some CNIs will assign its IP address to newly created pods. This can lead to duplicate pod IPs in the same Kubernetes cluster. Filter out pods which are in a Succeeded phase since they are not routable anymore. Fixes #5394 Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
…5412) Ignore pods with status.phase=Succeeded when watching IP addresses When a pod terminates successfully, some CNIs will assign its IP address to newly created pods. This can lead to duplicate pod IPs in the same Kubernetes cluster. Filter out pods which are in a Succeeded phase since they are not routable anymore. Fixes #5394 Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
|
|
|
Thank you, @kleimkuhler ! |
Ignore pods with status.phase=Succeeded when watching IP addresses
When a pod terminates successfully, some CNIs will assign its IP address
to newly created pods. This can lead to duplicate pod IPs in the same
Kubernetes cluster.
Filter out pods which are in a Succeeded phase since they are not
routable anymore.
Fixes #5394